package com.company.project.robot.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.company.project.common.exception.BusinessException;
import com.company.project.robot.entity.IdiomEntity;
import com.company.project.robot.entity.JokesEntity;
import com.company.project.robot.vo.ReptilesVo;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.CellType;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

/**
 * 成语表
 *
 * @author zyf
 * @email 2102378781@qq.com
 * @date 2021-11-03 16:24:25
 */
public interface IdiomService extends IService<IdiomEntity> {

    /**
     * @param china (字符串 汉字)
     * @return 汉字转拼音 其它字符不变
     */
    String getPinyin(String china);


    /**
     * 成语导入模板
     * @param request
     * @param response
     * @throws IOException
     */
    void exportExcel(HttpServletRequest request, HttpServletResponse response) throws IOException;


    /**
     * 导入数据
     * @param file
     * @return
     * @throws Exception
     */
    String excelImport(MultipartFile file) throws Exception;

    /**
     * 异步爬虫爬取成语大全数据
     *
     * @param reptilesVo
     * @return
     * @throws IOException
     */
    void listSave(ReptilesVo reptilesVo) throws IOException;
}

